home *** CD-ROM | disk | FTP | other *** search
/ Workbench Add-On / Workbench Add-On - Volume 1.iso / BBS-Archive / Dev / gcc263-src.lha / gcc-2.6.3 / config / sparc / sp64-elf.h < prev    next >
C/C++ Source or Header  |  1994-06-29  |  5KB  |  142 lines

  1. /* Definitions of target machine for GNU compiler,
  2.    for Sun SPARC-V9 on a hypothetical elf format machine.
  3.    Copyright (C) 1994 Free Software Foundation, Inc.
  4.    Contributed by Doug Evans, dje@cygnus.com.
  5.  
  6. This file is part of GNU CC.
  7.  
  8. GNU CC is free software; you can redistribute it and/or modify
  9. it under the terms of the GNU General Public License as published by
  10. the Free Software Foundation; either version 2, or (at your option)
  11. any later version.
  12.  
  13. GNU CC is distributed in the hope that it will be useful,
  14. but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16. GNU General Public License for more details.
  17.  
  18. You should have received a copy of the GNU General Public License
  19. along with GNU CC; see the file COPYING.  If not, write to
  20. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  21.  
  22. /* This is a v9 only compiler.  -mv8 is not expected to work.  If you want
  23.    a v8/v9 compiler, this isn't the place to do it.  */
  24. /* ??? Until real v9 machines exist, all of this is subject to change.  */
  25. /* ??? This file should really be called sp64-sol2.h or some such but that
  26.    would be a bit misleading since no such machines exist yet.  The current
  27.    name is also misleading since the term "elf" is more properly applied to
  28.    embedded configurations.  */
  29.  
  30. #define SPARCV9 /* See sparc.h.  */
  31.  
  32. /* ??? We're taking the scheme of including another file and then overriding
  33.    the values we don't like a bit too far here.  The alternative is to more or
  34.    less duplicate all of svr4.h, sparc/sysv4.h, and sparc/sol2.h here
  35.    (suitably cleaned up).  Until real sparc64 machines exist, it's not clear
  36.    which is better.  */
  37.  
  38. #include "sparc/sol2.h"
  39.  
  40. /* A v9 compiler with stack-bias, 32 bit integers and 64 bit pointers,
  41.    in a Medium/Anywhere code model environment.  */
  42.  
  43. #undef TARGET_DEFAULT
  44. #define TARGET_DEFAULT \
  45.   (MASK_V9 + MASK_STACK_BIAS + MASK_MEDANY + MASK_PTR64 + MASK_HARD_QUAD + MASK_EPILOGUE + MASK_FPU)
  46.  
  47. #undef CPP_PREDEFINES
  48. #define CPP_PREDEFINES \
  49.  "-Dsun -Dsparc -Dunix -D__svr4__ -D__sparc_v9__ \
  50.   -Asystem(unix) -Asystem(svr4) -Acpu(sparc64) -Amachine(sparc64)"
  51.  
  52. #undef CPP_SPEC
  53. #define CPP_SPEC "\
  54. %{mint64:-D__INT_MAX__=9223372036854775807LL -D__LONG_MAX__=9223372036854775807LL} \
  55. %{mlong64:-D__LONG_MAX__=9223372036854775807LL} \
  56. "
  57.  
  58. #undef MD_EXEC_PREFIX
  59. #undef MD_STARTFILE_PREFIX
  60.  
  61. /* Use the default (for now).  */
  62. #undef STARTFILE_SPEC
  63.  
  64. /* Use the default (for now).  */
  65. #undef LIB_SPEC
  66.  
  67. /* This is taken from sol2.h.  */
  68. #undef LINK_SPEC
  69. #define LINK_SPEC "\
  70. %{!nostdlib:%{!r*:%{!e*:-e _start}}} \
  71. %{h*} %{V} %{v:%{!V:-V}} \
  72. %{b} %{Wl,*:%*} \
  73. %{static:-dn -Bstatic} \
  74. %{shared:-G -dy} \
  75. %{symbolic:-Bsymbolic -G -dy} \
  76. %{G:-G} \
  77. %{YP,*} \
  78. %{R*} \
  79. %{Qy:} %{!Qn:-Qy} \
  80. "
  81.  
  82. /* Unfortunately, svr4.h redefines these so we have to restore them to
  83.    their original values in sparc.h.  */
  84. /* ??? It might be possible to eventually get svr4.h to do the right thing.  */
  85.  
  86. #undef PTRDIFF_TYPE
  87. #define PTRDIFF_TYPE "long long int"
  88.  
  89. #undef SIZE_TYPE
  90. #define SIZE_TYPE "long long unsigned int"
  91.  
  92. /* ??? This should be 32 bits for v9 but what can we do?  */
  93. #undef WCHAR_TYPE
  94. #define WCHAR_TYPE "short unsigned int"
  95.  
  96. #undef WCHAR_TYPE_SIZE
  97. #define WCHAR_TYPE_SIZE 16
  98.  
  99. /* ??? Disabled for v9 as the current implementation of the Medium/Anywhere
  100.    code model needs this in the data segment (still true?).  Let's hope the
  101.    assembler is fixed.  */
  102. #undef JUMP_TABLES_IN_TEXT_SECTION
  103.  
  104. /* System V Release 4 uses DWARF debugging info.
  105.    GDB doesn't support 64 bit stabs yet and the desired debug format is DWARF
  106.    anyway so it is the default.  */
  107.  
  108. #define DWARF_DEBUGGING_INFO
  109. #define DBX_DEBUGGING_INFO
  110.  
  111. #undef PREFERRED_DEBUGGING_TYPE
  112. #define PREFERRED_DEBUGGING_TYPE DWARF_DEBUG
  113.  
  114. /* Define the names of various pseudo-ops used by the Sparc/svr4 assembler.
  115.    ??? If ints are 64 bits then UNALIGNED_INT_ASM_OP (defined elsewhere) is
  116.    misnamed.  These should all refer to explicit sizes (half/word/xword?),
  117.    anything other than short/int/long/etc.  */
  118.  
  119. #define UNALIGNED_LONGLONG_ASM_OP    ".uaxword"
  120.  
  121. /* DWARF stuff.  */
  122.  
  123. #define ASM_OUTPUT_DWARF_ADDR(FILE,LABEL)                \
  124.  do {    fprintf ((FILE), "\t%s\t", UNALIGNED_LONGLONG_ASM_OP);        \
  125.     assemble_name (FILE, LABEL);                    \
  126.     fprintf (FILE, "\n");                        \
  127.   } while (0)
  128.  
  129. #define ASM_OUTPUT_DWARF_ADDR_CONST(FILE,RTX)                \
  130.   do {                                    \
  131.     fprintf ((FILE), "\t%s\t", UNALIGNED_LONGLONG_ASM_OP);        \
  132.     output_addr_const ((FILE), (RTX));                    \
  133.     fputc ('\n', (FILE));                        \
  134.   } while (0)
  135.  
  136. /* ??? Not sure if this should be 4 or 8 bytes.  4 works for now.  */
  137. #define ASM_OUTPUT_DWARF_REF(FILE,LABEL)                \
  138.  do {    fprintf ((FILE), "\t%s\t", UNALIGNED_INT_ASM_OP);        \
  139.     assemble_name (FILE, LABEL);                    \
  140.     fprintf (FILE, "\n");                        \
  141.   } while (0)
  142.